{extend name="layout" /}
{block name="body"}    
  <div class="row">
    <div class="col-lg-12">
      <div class="card">
        <div class="card-body">
          
          <form action="{:url('add')}" method="post" name="add-form" class="row add-form">
            <div class="form-group col-md-12">
              <label for="type">权限类型</label>
              <div class="form-controls">
                <select name="type" class="form-control selectpicker" id="type">
                  <option value="1">目录</option>
                  <option value="2">菜单</option>
                  <option value="3">按钮</option>
                  <option value="4">外链</option>
                </select>
              </div>
            </div>
            <div class="form-group col-md-12">
              <label for="name">规则标识</label>
              <div class="form-controls">
                <input type="text" class="form-control" id="name" name="name" value="" placeholder="请输入规则标识" />
                <small class="form-text text-muted">(最大长度为80个字符!)</small>
              </div>
            </div>
            <div class="form-group col-md-12">
              <label for="title">规则名称</label>
              <input type="text" class="form-control" id="title" name="title" value="" placeholder="请输入规则名称" />
              <small class="form-text text-muted">(最大长度为20个字符!)</small>
            </div>
            <div class="form-group col-md-12">
              <label>上级规则</label>
              <div class="form-controls">
                <select name="pid" class="form-control selectpicker" data-live-search="true">
                  {volist name="smenu" id="vo"}
                  <option value="{$vo.id}">{$vo.title_show|raw}</option>
                  {/volist}
                </select>
              </div>
            </div>
            {php}
            $form = ['title' => '图标', 'name' => 'icon'];
            {/php}
            {include file="../application/admin/view/form/fonticonpicker.html" type='' /}
            <div class="form-group col-md-12">
              <label for="sort">排序</label>
              <input type="text" class="form-control" id="sort" name="sort" value="10" />
            </div>
            <div class="form-group col-md-12">
              <label for="remark">备注</label>
              <div class="form-controls">
                <textarea name="remark" class="form-control" rows="3" id="remark"></textarea>
                <small class="form-text text-muted">(50个字符以内!)</small>
              </div>
            </div>
            <div class="form-group col-md-12">
              <label>状态</label>
              <div class="form-controls clearfix">
                <div class="custom-control custom-radio custom-control-inline">
                  <input type="radio" id="statusOne" name="status" class="custom-control-input" value="0">
                  <label class="custom-control-label" for="statusOne">禁用</label>
                </div>
                <div class="custom-control custom-radio custom-control-inline">
                  <input type="radio" id="statusTwo" name="status" class="custom-control-input" value="1" checked>
                  <label class="custom-control-label" for="statusTwo">启用</label>
                </div>
              </div>
            </div>
            <div class="form-group col-md-12">
              <button type="submit" class="btn btn-primary m-r-5 ajax-post" target-form="add-form">确 定</button>
              <button type="button" class="btn btn-default" onclick="javascript:history.back(-1);return false;">返 回</button>
            </div>
          </form>
 
        </div>
      </div>
    </div>
    
  </div>
{/block}
{block name="otherjs"}
{include file="../application/admin/view/form/formjs.html" /}
{/block}